﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace yq.Controller
{

    /// <summary>
    /// 主页面部分
    /// </summary>
    public class SysRegistration : AreaRegistration
    {
        /// <summary>
        /// 主页区域
        /// </summary>
        public override string AreaName
        {
            get
            {
                return "Sys";
            }
        }


        /// <summary>
        /// 主页区域注册
        /// </summary>
        /// <param name="context"></param>
        public override void RegisterArea(AreaRegistrationContext context)
        {
           
            context.MapRoute(
                "Sys",
                "Sys/{controller}/{action}/{id}",
                new { controller = "Api", action = "Index", id = UrlParameter.Optional },
                 null,
            new string[] { "yq.Controller.Sys" }
            );
        }
    }

    /// <summary>
    /// 主页面部分
    /// </summary>
    public class HomeRegistration : AreaRegistration
    {
        /// <summary>
        /// 主页区域
        /// </summary>
        public override string AreaName
        {
            get
            {
                return "Home";
            }
        }


        /// <summary>
        /// 主页区域注册
        /// </summary>
        /// <param name="context"></param>
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Home",
                "Home/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                 null,
            new string[] { "yq.Controller.Home" }
            );
        }
    }

    /// <summary>
    /// 文件管理
    /// </summary>
    public class FileRegistration : AreaRegistration
    {
        /// <summary>
        /// 文件管理区域
        /// </summary>
        public override string AreaName
        {
            get
            {
                return "File";
            }
        }


        /// <summary>
        /// 文件管理区域注册
        /// </summary>
        /// <param name="context"></param>
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "File",
                "File/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                 null,
            new string[] { "yq.Controller.File" }
            );
        }
    }
}
